package com.itheima.map;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/*
Map的遍历
第一种
keySet 获取所有的键   根据键找值
get(key)
 */
public class Demo03 {

    public static void main(String[] args) {
        Map<String, String> map = new HashMap<>();
        map.put("宝强","马蓉");
        map.put("宋喆","马蓉");
        map.put("乃亮","小璐");
        map.put("PGone","小璐");

        //keySet 获取所有的键
        Set<String> keys = map.keySet();
        for (String key : keys) {
           // System.out.println(key);
            String value = map.get(key);
            System.out.println(key+"==="+value);
        }



    }

}
